package com.spsoft.vatoutinv.service.vmsmanualinvoice;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.spsoft.core.model.Result;
import com.spsoft.core.model.bo.TokenUser;
import com.spsoft.vatoutinv.entity.vmsmanualinvoice.VmsManualBase;
import com.spsoft.vatoutinv.model.dto.vmsmanualinvoice.VmsManualInvoiceDto;
import com.spsoft.vatoutinv.model.dto.vmsmanualinvoice.VmsManualPageDto;
import com.spsoft.vatoutinv.model.vo.vmsmanualinvoice.VmsManualBaseVo;
import com.spsoft.vatoutinv.model.vo.vmsmanualinvoice.VmsManualDefaultVo;
import com.spsoft.vatoutinv.model.vo.vmsmanualinvoice.VmsManualInvoiceVo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

/**
 * <p>
 * 手工开票临时表-主表 服务类
 * </p>
 *
 * @author chenxudong
 * @since 2023-11-30
 */
public interface VmsManualBaseService extends IService<VmsManualBase> {

    /**
     * 手工发票开具-新增发票前的校验
     */
    Result<Object> checkBeforeAdd(String deptCode);

    /**
     * 手工发票开具-获取默认带出数据
     */
    Result<VmsManualDefaultVo> getBaseInfo(TokenUser tokenUser);

    /**
     * 手工发票开具-获取发票列表分页数据
     */
    Result<IPage<VmsManualBaseVo>> getPageInfo(VmsManualPageDto vmsManualPageDto);

    /**
     * 手工发票开具-单张发票校验并保存
     */
    Result<Object> checkAndSave(VmsManualInvoiceDto vmsManualInvoiceDto, TokenUser tokenUser);

    /**
     * 手工发票开具-获取发票信息
     */
    Result<VmsManualInvoiceVo> getInvoiceInfo(Long baseId);

    /**
     * 手工发票开具-修改发票信息
     */
    Result<Object> updateInvoice(VmsManualInvoiceDto vmsManualInvoiceDto, TokenUser tokenUser);

    /**
     * 手工发票开具-删除发票信息
     */
    Result<Object> deleteInvoice(Long baseId);

    /**
     * 手工发票开具-下载Excel模板
     */
    void downloadExcel(HttpServletResponse response);

    /**
     * 手工发票开具-读取Excel
     */
    Result<Object> readAndSaveExcel(MultipartFile file, String fppz, Long applyId, TokenUser tokenUser);

    /**
     * 手工发票开具-开票
     */
    Result<Object> manualInvoice(Long applyId, TokenUser tokenUser);

}
